import React from 'react';
import Navbar from 'react-bootstrap/lib/Navbar';
import NavItem from 'react-bootstrap/lib/NavItem';
import Nav from 'react-bootstrap/lib/Nav';
import NavSearch from './NavSearch';

import { Link } from 'react-router';

export default class HeaderNavigation extends React.Component {

  render() {
    const items = this.props.items.map((item, key) => (
      <li key={item.label}>
        <Link to={item.link}>{item.label}</Link>
      </li>
    ));

    let brand = <a href='#'>CAS</a>;
    return (
      <Navbar fluid>
        <Navbar.Header>
          <Navbar.Brand>
          {brand}
          </Navbar.Brand>
          <Navbar.Toggle />
        </Navbar.Header>
        <Navbar.Collapse>
          <Nav>
          {items}
          </Nav>
          <Nav pullRight>
            <NavSearch />
          </Nav>
        </Navbar.Collapse>
	  </Navbar>
    );
  }
}
